<%@ page import="com.ktjy.entity.UserAco" %>
    <%@ page contentType="text/html;charset=UTF-8" language="java" %>
        <html>

        <head>
            <title>登录成功</title>
            <style>
                .success-container {
                    text-align: center;
                    margin-top: 100px;
                    font-family: "Microsoft YaHei", sans-serif;
                }

                .welcome-message {
                    color: #28a745;
                    font-size: 24px;
                    margin-bottom: 20px;
                }

                .user-info {
                    color: #666;
                    font-size: 18px;
                    margin-bottom: 30px;
                }

                .nav-links {
                    margin-top: 20px;
                }

                .nav-link {
                    display: inline-block;
                    margin: 0 10px;
                    padding: 10px 20px;
                    background-color: #007bff;
                    color: white;
                    text-decoration: none;
                    border-radius: 5px;
                    transition: background-color 0.3s;
                }

                .nav-link:hover {
                    background-color: #0056b3;
                }
            </style>
        </head>

        <body>
            <div class="success-container">
                <% UserAco userAco=(UserAco) session.getAttribute("user"); if(userAco !=null) { %>
                    <div class="welcome-message">登录成功！</div>
                    <div class="user-info">欢迎您，<%= userAco.getUsername() %>
                    </div>
                    <div class="nav-links">
                        <a href="${pageContext.request.contextPath}/book/allBook" class="nav-link">图书管理</a>
                        <a href="${pageContext.request.contextPath}/user/personal" class="nav-link">个人中心</a>
                        <a href="${pageContext.request.contextPath}/logout" class="nav-link">退出登录</a>
                    </div>
                    <% } else { %>
                        <div class="welcome-message" style="color: #dc3545;">会话已过期，请重新登录</div>
                        <div class="nav-links">
                            <a href="${pageContext.request.contextPath}/index.jsp" class="nav-link">返回登录</a>
                        </div>
                        <% } %>
            </div>
        </body>

        </html>